Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 5 - Sequence Grabber Components / Sequence Grabber Components Reference
Sequence Grabber Component Functions / Controlling Sequence Grabber Components


SGPrepare

The SGPrepare function instructs the sequence grabber to get ready to begin a preview or record operation (or to commence both operations). You specify the operations.

pascal ComponentResult SGPrepare (SeqGrabComponent s, 
                                 Boolean prepareForPreview,
                                 Boolean prepareForRecord);
s
Specifies the component instance that identifies your connection to the sequence grabber component. You obtain this value from the Component Manager's OpenDefaultComponent or OpenComponent function.
prepareForPreview
Instructs the sequence grabber component to prepare for a preview operation. Set this parameter to true to prepare for a preview operation. You may set both the prepareForPreview and prepareForRecord parameters to true.
prepareForRecord
Instructs the sequence grabber component to prepare for a record operation. Set this parameter to true to prepare for a record operation. You may set both the prepareForPreview and prepareForRecord parameters to true.
DESCRIPTION
The sequence grabber component does whatever is necessary to get ready to start the preview or record operation. This may involve allocating memory, readying hardware, and notifying the sequence grabber's channels. By calling this function, you ensure that the SGStartRecord or SGStartPreview function starts as quickly as possible.

If you do not call this function before starting a record or preview operation, the sequence grabber component makes these preparations when you start the operation. You cannot call this function after you start a preview or record operation.

If you call SGPrepare without subsequently starting a record or preview operation, you should call the SGRelease function (described in the next section). This allows the sequence grabber component to release any system resources it allocated when you called SGPrepare.

SPECIAL CONSIDERATIONS
The window in which the sequence grabber is to draw video frames (as defined by
the SGSetGWorld function, described on page 5-27) must be visible before you call the SGPrepare function. Otherwise, the sequence grabber does not display the frames properly. If the window isn't visible and SGPrepare is called with the prepareForPreview parameter set to true and the prepareForRecord parameter set to false, and the window is subsequently shown via the Window Manager's ShowWindow routine, the sequence grabber won't display frames properly in the video window. The visible region of the window wasn't valid when the SGPrepare call
was made.

RESULT CODES
paramErr-50Invalid parameter specified
cantDoThatInCurrentMode-9402Request invalid in current mode
notEnoughMemoryToGrab-9403Insufficient memory for record operation
notEnoughDiskSpaceToGrab-9404Insufficient disk space for record operation
deviceCantMeetRequest-9408Device cannot support grabber
File Manager errors
Memory Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help